home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 March / macformat-022.iso / Shareware City / Developers / src / out-of-phase-102-c / OutOfPhase 1.02 Source / OutOfPhase Folder / ModulationSpecifier.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-11-23  |  3.5 KB  |  100 lines  |  [TEXT/KAHL]

  1. /* ModulationSpecifier.h */
  2.  
  3. #ifndef Included_ModulationSpecifier_h
  4. #define Included_ModulationSpecifier_h
  5.  
  6. /* ModulationSpecifier module depends on */
  7. /* MiscInfo.h */
  8. /* Audit */
  9. /* Debug */
  10. /* Definitions */
  11. /* Memory */
  12. /* OscillatorSpecifier */
  13. /* OscillatorListSpecifier */
  14. /* DataMunging */
  15. /* Envelope */
  16. /* LFOListSpecifier */
  17.  
  18. /* list of modes for modulation operators */
  19. /*  - eModulationAdditive:  modulate by adding the two streams together */
  20. /*  - eModulationMultiplicative:  modulate by multiplying the two streams */
  21. typedef enum
  22.     {
  23.         eModulationAdditive EXECUTE(= -13871), /* added into target data */
  24.         eModulationMultiplicative /* multiplied by target data */
  25.     } ModulationTypes;
  26.  
  27. /* list of destinations for modulation */
  28. /*  - eModulatePhaseGen:  the output of one of the oscillators is used to */
  29. /*       modulate the phase generator of another oscillator */
  30. /*  - eModulateOutput:  the output of one of the oscillators is used to modulate */
  31. /*       the output of another oscillator */
  32. typedef enum
  33.     {
  34.         eModulatePhaseGen EXECUTE(= -9719), /* modulate wave phase generator */
  35.         eModulateOutput /* modulate output from wave lookup */
  36.     } ModDestTypes;
  37.  
  38. struct ModulationSpecRec;
  39. typedef struct ModulationSpecRec ModulationSpecRec;
  40.  
  41. /* forwards */
  42. struct OscillatorListRec;
  43. struct OscillatorRec;
  44. struct EnvelopeRec;
  45. struct LFOListSpecRec;
  46.  
  47. /* create new list of modulation source specifiers */
  48. ModulationSpecRec*        NewModulationSpecifier(void);
  49.  
  50. /* dispose a list of modulation source specifiers */
  51. void                                    DisposeModulationSpecifier(ModulationSpecRec* ModSpec);
  52.  
  53. /* append a new entry.  the object becomes owner of the name */
  54. MyBoolean                            AppendModulationSpecEntry(ModulationSpecRec* ModSpec,
  55.                                                 ModulationTypes ModulationType,
  56.                                                 ModDestTypes ModulationDestination,
  57.                                                 struct EnvelopeRec* ScalingEnvelope,
  58.                                                 struct LFOListSpecRec* ScalingLFOList,
  59.                                                 struct EnvelopeRec* OriginAdjustEnvelope,
  60.                                                 struct LFOListSpecRec* OriginAdjustLFOList,
  61.                                                 char* InputOscillatorName);
  62.  
  63. /* get the total number of entries in the modulation list */
  64. long                                    GetModulationSpecNumEntries(ModulationSpecRec* ModSpec);
  65.  
  66. /* resolve named references into actual oscillator references.  returns False */
  67. /* if a name couldn't be resolved. */
  68. MyBoolean                            ResolveModulationReferences(ModulationSpecRec* ModSpec,
  69.                                                 struct OscillatorListRec* OscillatorList);
  70.  
  71. /* get the modulation type of one of the sources */
  72. ModulationTypes                GetModulationOpType(ModulationSpecRec* ModSpec, long Index);
  73.  
  74. /* get the destination of the modulation */
  75. ModDestTypes                    GetModulationDestType(ModulationSpecRec* ModSpec, long Index);
  76.  
  77. /* get the oscillator name for one of the sources (this is the original string) */
  78. char*                                    GetModulationOscillatorName(ModulationSpecRec* ModSpec, long Index);
  79.  
  80. /* get the actual oscillator reference for one of the sources */
  81. struct OscillatorRec*    GetModulationOscillatorRef(ModulationSpecRec* ModSpec, long Index);
  82.  
  83. /* get the scaling factor envelope */
  84. struct EnvelopeRec*        GetModulationScalingFactorEnvelope(ModulationSpecRec* ModSpec,
  85.                                                 long Index);
  86.  
  87. /* get the scaling factor LFO list */
  88. struct LFOListSpecRec*    GetModulationScalingFactorLFOList(ModulationSpecRec* ModSpec,
  89.                                                 long Index);
  90.  
  91. /* get the origin adjust envelope */
  92. struct EnvelopeRec*        GetModulationOriginAdjustEnvelope(ModulationSpecRec* ModSpec,
  93.                                                 long Index);
  94.  
  95. /* get the origin adjust LFO list */
  96. struct LFOListSpecRec*    GetModulationOriginAdjustLFOList(ModulationSpecRec* ModSpec,
  97.                                                 long Index);
  98.  
  99. #endif
  100.